package com.zeta.api.client.demo;

import com.zeta.api.model.PythonModelSaveDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.zetaframework.base.result.ApiResult;

import java.util.Map;

/**
 * PythonDemo服务 Feign接口
 *
 * @author gcc
 */
@FeignClient(name = "python-demo-server", path = "/demo/py", fallbackFactory = IDemoPythonApiFallbackFactory.class)
public interface IDemoPythonApi {

    /**
     * 健康检测
     */
    @GetMapping("/health")
    Map<String, Object> health();

    /**
     * 新增
     *
     * @param saveDTO 新增参数
     */
    @PostMapping
    ApiResult<Boolean> save(@RequestBody PythonModelSaveDTO saveDTO);

}
